<?php
################################################################################################
#  DIY Module Builder for Opencart 1.5.1.x From HostJars http://opencart.hostjars.com    	   #
################################################################################################
?><?php

class ControllerModuleTFilter extends Controller {
	protected function index($settings) {
		//Load the language file for this module - catalog/language/module/t_filter.php
		$this->language->load('module/t_filter');

		//Get the title from the language file

		//Load any required model files - catalog/product is a common one, or you can make your own DB access
		//methods in catalog/model/module/t_filter.php
		$this->load->model('module/t_filter');

		//Example functionality: pull through customer firstnames and make them available to the view.

		//Choose which template to display this module with
		if (file_exists(DIR_TEMPLATE . $this->config->get('config_template') . '/template/module/t_filter.tpl')) {
			$this->template = $this->config->get('config_template') . '/template/module/t_filter.tpl';
		} else {
			$this->template = 'default/template/module/t_filter.tpl';
		}
		$this->data["form_action"]=$this->url->link("product/t_filter");
		$this->data["filter"]=$this->model_module_t_filter->getFilterDetails($settings["filter"]);
		$this->data["text_submit"]=$this->language->get("text_submit");
		$this->data["text_all"]=$this->language->get("text_all");
		$this->data["text_yes"]=$this->language->get("text_yes");
		$this->data["text_no"]=$this->language->get("text_no");
		$this->data["filterroute"]=(isset($this->request->get['route']))?$this->request->get['route']:'common/home';

		//Render the page with the chosen template
		$this->render();
	}
}
?>